home *** CD-ROM | disk | FTP | other *** search
/ 500 MB Nyheder Direkte fra Internet 2 / 500 MB nyheder direkte fra internet CD 2.iso / start / data / text / qafile.txt < prev    next >
Text File  |  1994-09-21  |  57KB  |  1,161 lines

  1.  
  2.               STARTING
  3.   Here's how to handle databases by using Q&A versions 3 and 4 
  4. for DOS.
  5.  
  6.           Prepare yourself
  7.   Before using Q&A to handle databases, practice using Q&A to 
  8. handle word processing, by reading pages 172-182. For example, I 
  9. assume you've followed the instructions on page 172 about how to 
  10. ``Make Q&A act better''.
  11.  
  12.             The main menu
  13.   By following the instructions on page 172 about how to ``Run 
  14. Q&A'', make the computer display this Q&A main menu:
  15. Q&A MAIN MENU
  16. F - File
  17. R - Report
  18. W - Write
  19. A - Assistant
  20. U - Utilities
  21. X - Exit Q&A
  22.   If you're using version 4 and have a mouse, you'll see a small 
  23. red rectangle in the middle of the screen. Move that rectangle 
  24. out of the way ___ to the screen's top right corner ___ by 
  25. rolling the mouse toward your desk's back right corner.
  26.  
  27.             The file menu
  28.   To make Q&A handle databases, choose ``F - File'' from the main 
  29. menu by pressing the F key. (That works if you followed the 
  30. instructions on page 172 about how to ``Make Q&A act better''. If 
  31. you did not follow those instructions, you must press ENTER after 
  32. pressing F ___ and you must press ENTER after choosing any item 
  33. from any menu.)
  34.   The screen shows the file menu. In version 4, it looks like 
  35. this:
  36. ┌─────────────────────────────────────┐
  37. │               FILE MENU             │
  38. ├───────────────────┬─────────────────┤
  39. │ D - Design file   │ R - Remove      │
  40. │ A - Add data      │ M - Mass update │
  41. │ S - Search/update │ T - Post        │
  42. │ P - Print         │ U - Utilities   │
  43. │ C - Copy          │                 │
  44. └───────────────────┴─────────────────┘
  45. (Version 3 lacks ``T - Post'' and ``U - Utilities''. You see ``B 
  46. - Backup'' instead.)
  47.   Whenever you're done filing, you should return to the main menu 
  48. by pressing the Esc key several times. Then you can exit by 
  49. pressing X. That's the only correct way to stop using Q&A's 
  50. database. Do not just turn off the power! If you turn off the 
  51. power without pressing X first, you might wreck the data files 
  52. you created.
  53.                                                   Field commands
  54.                                          While using the filing 
  55. part of Q&A, you can give these field commands:
  56. Field command                                      Keys to press
  57. Add new records                                    Ctrl F6
  58.  
  59. Calculate                                          F8
  60. Calculate mode                                     Shift F8
  61. Customize file                                     Shift F9
  62.  
  63. Date                                               Ctrl F5
  64. Delete field/line                                  Shift F4
  65. Delete field/line end                              Ctrl F4
  66. Delete record                                      F3
  67. Delete word                                        F4
  68. Ditto field                                        F5
  69. Ditto record                                       Shift F5
  70.  
  71. Edit field                                         F6
  72.  
  73. File menu                                          Shift F10
  74.  
  75. Help                                               F1
  76.  
  77. Macro                                              Shift F2
  78. Macro run                                          Alt F2just in 
  79. version 4
  80. Mask override                                      Alt F4just in 
  81. version 4
  82.  
  83. Next record                                        F10
  84.  
  85. Previous record                                    F9
  86. Print record                                       F2
  87. Print remaining records                            Ctrl F2
  88.  
  89. Reset @NUMBER                                      Ctrl F8
  90. Retrieve spec                                      Alt F8just in 
  91. version 4
  92.  
  93. Search for records                                 F7
  94. Search options                                     Ctrl F7
  95.  
  96. Table                                              Alt F6
  97. Table definition                                   Shift F6
  98. Time                                               Alt F5
  99.  
  100. Undo edit                                          Shift F7just 
  101. in version 4
  102.  
  103. Values permitted                                   Alt F7just in 
  104. version 4
  105. Put that chart (or a photocopy of it) next to the computer.
  106.                                          The rest of this chapter 
  107. explains how to use the file menu and the field commands.
  108.  
  109.              DESIGN FILE
  110.   Here's how to design a new file. From the file menu, choose ``D 
  111. - Design file'' (by pressing D).
  112.   That makes the computer show the design menu. In version 4, it 
  113. looks like this:
  114. DESIGN MENU
  115. D - Design a new file
  116. R - Redesign a file
  117. C - Customize a file
  118. P - Program a file
  119. S - Secure a file
  120. A - Customize application
  121. (In version 3, the bottom three choices are missing.)
  122.   Look back on page 148, at the sample file of students in the 
  123. School of Life. Let's create that file and call it STUDENTS. To 
  124. do that, press the D key (which chooses ``D -Design a new file'' 
  125. from the menu), type ``students'', then press ENTER.
  126.  
  127.             Type the form
  128.   Most of the screen will become blank. On the blank screen, type 
  129. a form, which you'll fill in later. For example, if you want to 
  130. store each student's last name, first name, age, and class, plus 
  131. comments, type this form:
  132. Last name:                              First name:
  133. Age:                Class:
  134. Comments:
  135. Here's how. Type the word ``Last'', then a space, then the word 
  136. ``name'', then a colon. Move to the right (by holding down the 
  137. right-arrow key or space bar or TAB key), then type the phrase 
  138. ``First name'', then a colon. Press the ENTER key, and type the 
  139. lines underneath.
  140.   That form creates five fields: last name, first name, age, 
  141. class, and comments. Each field name ends with a colon.
  142.   When you've finished typing the form, copy it onto the hard 
  143. disk, by pressing the F10 key.
  144.  
  145.         Examine the T screen
  146.   On the screen, you'll see the form you typed. The computer 
  147. automatically puts a T in each field, so your screen looks like 
  148. this:
  149. Last name: T                            First name: T
  150. Age: T              Class: T
  151. Comments: T
  152.  
  153.                                                   Move the cursor
  154.                                          The cursor's at the 
  155. first T. To move the cursor around the screen, you can use the 
  156. arrow keys.
  157.                                          To move the cursor 
  158. faster, use the TAB key (which is next to the Q key). When you 
  159. press the TAB key, the cursor moves to the next field.
  160.                                          For example, if the 
  161. cursor's at the T for ``Last name'', and you press the TAB key, 
  162. the cursor will move to the T for ``First name''. If you press 
  163. the TAB key again, the cursor will move to the T for ``Age''.
  164.                                          Experiment! Try moving 
  165. the cursor around the screen by using the TAB key.
  166.                                          Unfortunately, the TAB 
  167. key is hard for your fingers to reach. To move the cursor more 
  168. easily, tap the ENTER key instead. (While you're manipulating a 
  169. form, the ENTER key imitates the TAB key.)
  170.                                          So to move the cursor 
  171. ahead to the next field, tap TAB or ENTER. To move back to the 
  172. previous field, tap TAB (not ENTER) while holding down the Shift 
  173. key.
  174.  
  175.                                                    Change T to N
  176.                                          Each T on the screen is 
  177. a format code; it stands for ``Text''. If you want a field to 
  178. contain a number instead of text, change that field's T to an N.
  179.                                          For example, since you 
  180. want the person's ``Age'' to be a number, you must change Age's T 
  181. to N. To do that, move the cursor to the Age's T (by pressing the 
  182. TAB key), then type N.
  183.                                          You can type either N or 
  184. n. The computer doesn't care about capitalization.
  185.                                          Also change Class's T to 
  186. N, so your screen looks like this:
  187. Last name: T                            First name: T
  188. Age: N              Class: N
  189. Comments: T
  190. That tells the computer that the person's age and class are 
  191. Numbers, and everything else about the person consists of words 
  192. and other general Text.
  193.                                          Use the N code just for 
  194. numbers that are simple (such as 0, 7, 2150, .2, .09, and -31.8).
  195.                                          Use the T code for 
  196. numbers that contain dashes (such as phone numbers) and for long 
  197. numbers that can begin with 0 (such as ZIP codes). Use the T code 
  198. for social security numbers, since they contain dashes and can 
  199. begin with 0.
  200.  
  201.                                                       Finish
  202.                                          Press the F10 key. The 
  203. computer will say GLOBAL FORMAT OPTIONS.
  204.                                          Press F10 again. You'll 
  205. see the file menu again.
  206.                                          Congratulations! You've 
  207. created a STUDENTS database on your hard disk! That database 
  208. consists of two files (STUDENTS.DTF and STUDENTS.IDX) in the QA 
  209. subdirectory.
  210.  
  211.                     ADD DATA
  212.   You've seen how to make the computer put a file called STUDENTS 
  213. onto the disk. Although the file is organized so that each record 
  214. will consist of five fields, the file doesn't contain any records 
  215. yet, since it doesn't yet contain the names and data about any 
  216. specific students.
  217.   To add the names of specific students and the data about them, 
  218. choose ``A - Add data'' from the file menu (by pressing A). Press 
  219. ENTER.
  220.   The screen will show the form you designed:
  221. Last name:                              First name:
  222. Age:                Class:
  223. Comments:
  224. Then fill in the blanks.
  225.   For example, suppose one of the students is Suzy Smith. Fill in 
  226. the form to look like this:
  227. Last name: Smith                        First name: Suzy
  228. Age: 4              Class: 12
  229. Comments: Though just 4 years old, she finished high school 
  230. because she's fast.
  231. Here's how. Type Smith, then move the cursor to the next field by 
  232. pressing ENTER (or TAB). Type Suzy, then press ENTER. Type 4, 
  233. then ENTER. Type 12, then ENTER. Type the commentary sentence.
  234.   When you've finished filling in Suzy Smith's form, say ``Next 
  235. record'' (by pressing F10). Then the computer will show a blank 
  236. form again:
  237. Last name:                              First name:
  238. Age:                Class:
  239. Comments:
  240. Fill in the blanks again, for the next student (Clara Bell).
  241.   Repeat that process for each student. As you type the students' 
  242. records, the computer automatically copies them to the 
  243. STUDENTS.DTF file (which is in your hard disk's QA subdirectory).
  244.  
  245.                  Move the cursor
  246.   To move the cursor a short distance, use the arrow keys. Here's 
  247. how to move the cursor farther:
  248. Keys you pressWhere the cursor will move
  249. TAB         the next field
  250. Shift with TABthe previous field
  251.  
  252. HOME        the beginning of the field
  253. END         the end of the field
  254.  
  255. HOME HOME   the first field on the screen
  256. END END     the last field on the screen
  257.  
  258. F10         the next record
  259. F9          the previous record
  260.  
  261. Ctrl with HOMEthe first record you added during this session
  262. Ctrl with ENDthe last record you added during this session
  263.  
  264.                      Delete
  265.   If you make a mistake, point at it (by moving the cursor 
  266. there), then tell the computer how much to delete.
  267.   To delete just one character, press the Del key. To delete a 
  268. whole word, say ``Delete word'' (by pressing F4). To delete 
  269. everything you typed in the field, say ``Delete field/line'' (by 
  270. pressing Shift with F4). To delete everything you typed in the 
  271. whole record, say ``Delete record'' (by pressing F3); when the 
  272. computer asks ``Are you sure?'', press Y.
  273.  
  274.                       Ditto
  275.   If you move the cursor to a field and then say ``Ditto field'' 
  276. (by pressing F5), the computer will make the data in that field 
  277. be a copy of the previous student's. To make the entire record be 
  278. a copy of the previous student's, say ``Ditto record'' (by 
  279. pressing Shift with F5).
  280.                                                    Edit (just in version 4)
  281.                                                      If you have 
  282. version 4, try this trick: while you're typing words in a field, 
  283. say ``Edit field'' (by pressing F6).
  284.                                                      A gigantic 
  285. box will appear at the bottom of the screen. The words you typed 
  286. appear in that box. Since the box is big, it can hold lots of 
  287. words. Type as many as you wish! You can even type a long essay 
  288. about the student! When you type near the box's bottom, the text 
  289. in the box automatically moves out of the way, so you can type 
  290. even more! You can type many pages! While you're typing them, 
  291. you're using Q&A's word processor, so you can use all the 
  292. word-processing tricks you learned: press ENTER at the end of 
  293. each paragraph, press TAB to indent a paragraph, and use page 
  294. 154's table to give advanced word-processing commands (such as 
  295. ``Spell'' and ``Thesaurus'').
  296.                                                      When you 
  297. finish typing in the box, press the F10 key.
  298.                                                      In the 
  299. future, whenever you want to see or edit that boxed essay again, 
  300. move the cursor to that field and say ``Edit field'' (F6) again.
  301.  
  302.                                                             Finish
  303.                                                      When you 
  304. finish typing the last student's record, and you still see that 
  305. record on the screen, say ``File menu'' by pressing Shift with 
  306. F10 (instead of saying ``Next record''). Then the screen will 
  307. display the file menu again (instead of waiting for you to type 
  308. another record).
  309.  
  310.                   SEARCH/UPDATE
  311.   To search through the file to find a particular student, choose 
  312. ``S - Search/update'' from the file menu (by pressing S). Press 
  313. ENTER.
  314.   The screen will show the form you designed again:
  315. Last name:                              First name:
  316. Age:                Class:
  317. Comments:
  318. If you fill in a few of the blanks, the computer will fill in the 
  319. rest. For example, if you fill in just the last name (Smith) and 
  320. press F10, the computer will find everybody whose last name is 
  321. Smith. It will show you each Smith's record, one at a time.
  322.   Whenever the computer finds a Smith's record, the computer 
  323. pauses to let you look at the record and edit it. (Editing is 
  324. also called updating.) To edit the record, move the cursor to the 
  325. field you want to revise (by pressing TAB, ENTER, or arrow keys), 
  326. then retype that field. (To hop to the screen's bottom field, 
  327. press END twice; to hop back up to the screen's top field, press 
  328. HOME twice.)
  329.   When you finish examining and revising the record, choose one 
  330. of these actions:
  331. What you want to do nextWhat to say
  332. see the next Smith  ``Next record'' (by pressing F10)
  333. see the previous Smith``Previous record'' (by pressing F9)
  334.  
  335. see the first Smith Ctrl with HOME
  336. see the final Smith Ctrl with END
  337.  
  338. see the file menu   ``File menu'' (by pressing Shift with F10)
  339.  
  340. delete this Smith & see the next Smith``Delete record'' (F3) then 
  341. Y
  342.  
  343. undo the revisions  ``Undo edit'' (Shift F7, just in version 4)
  344. undo the revisions & see the file menupress Esc, then usually Y
  345.  
  346. search for other records (not Smiths)``Search for records'' (by 
  347. pressing F7)
  348. create other records & add them to file``Add new records'' (by 
  349. pressing Ctrl with F6)
  350.   If the computer can't find who you're searching for (because 
  351. there aren't any Smiths or there isn't any ``next Smith'' or 
  352. ``previous Smith''), the computer will say ``No forms'' or ``No 
  353. more forms'' or ``No previous form''. Press the Esc key, which 
  354. makes the computer show the file menu.
  355.  
  356.              Fancy search techniques
  357.   If you tell the computer to search for ``smith'' instead of 
  358. ``Smith'', the computer will still find all the Smiths, since the 
  359. computer doesn't care about capitalization.
  360.   If you tell the computer to search for ``S..'' instead of 
  361. ``Smith'' (by putting ``S..'' in the last name field), the 
  362. computer will get everybody whose last name begins with ``S''. 
  363. Saying ``..th'' gets names ending with ``th''. Saying ``..m..'' 
  364. gets names containing an ``m''. Saying ``S..h'' gets every name 
  365. that begins with S and ends with h. Saying ``S????'' gets every 
  366. name that contains an S followed by exactly 4 more letters.
  367.   Not The symbol for ``not'' is ``/''. For example, saying 
  368. ``/Smith'' gets everybody whose name is not Smith. Saying 
  369. ``/..m..'' gets every name not containing an m.
  370.   Or The symbol for ``or'' is ``;''. For example, saying 
  371. ``Smith;Bell'' gets everybody named Smith or Bell.
  372.   Unsure of the spelling? Suppose you want to find Kosinski's 
  373. record, but you can't remember how he spells his name. You don't 
  374. remember whether it's ``Kosinski'', ``Cosinski'', ``Kozinski'', 
  375. ``Kosinscki'', or ``Kosinsky''; you remember merely that it 
  376. includes the letters ``in''. If you put ``..in..'' into the last 
  377. name field, the computer will find everybody whose name contains 
  378. ``in'' ___ and it will find Kosinski's record.
  379.   Suppose somebody phones to ask you about a student; but the 
  380. phone connection is poor (with lots of static) and the person 
  381. also mumbles. You think he's asking about somebody named 
  382. ``Cuzomskuh'', but you're not sure. Tell the computer to find all 
  383. the students that sound like ``Cuzomskuh''. To do that, put 
  384. ``~Cuzomskuh'' in the last name field. The symbol ~ means 
  385. ``sounds like''. (On the original IBM keyboard, it's next to the 
  386. ENTER key; on the new IBM keyboard, it's next to the 1 key; on 
  387. the Leading Edge keyboard, it's next to the BACKSPACE key. While 
  388. typing it, you must hold down the Shift key.) The computer will 
  389. find Kosinski and any other students that sound like 
  390. ``Cuzomskuh''.
  391.                                                      Search on 
  392. age If you fill in just the age, the computer will find everybody 
  393. that age. For example, to find everybody who's 10 years old, put 
  394. ``10'' in the age field.
  395.                                                      To find 
  396. everybody who's less than 10 years old, say ``<10''. For greater 
  397. than 10, say ``>10''. For greater than or equal to 10, say 
  398. ``>=10''. For greater than 10 but less than 18, say ``>10..<18''.
  399.                                                      To find the 
  400. oldest student, say ``max''. To find the youngest, say ``min''.
  401.                                                      To find the 
  402. 3 oldest students, say ``max3''. The computer will show you the 
  403. oldest student, then the next oldest, then the 3rd oldest.
  404.                                                      In the age 
  405. field, if you say just ``='' (instead of ``=10''), the computer 
  406. will find everybody whose age is equal to nothing: it will find 
  407. everybody whose age was left blank. To find everybody whose age 
  408. is not blank, ask for ``/=''.
  409.                                                      Alphabetical 
  410. order The computer understands alphabetical order ___ the order 
  411. in which words and names would appear in a dictionary.
  412.                                                      For example, 
  413. if you ask for the names that are ``<Smith'' (by putting 
  414. ``<Smith'' in the last name field), the computer will find all 
  415. names ``less than Smith'', which means all names that come before 
  416. Smith in the dictionary. Asking for ``>Smith'' gets you all names 
  417. that come after Smith in the dictionary.
  418.                                                      Search 
  419. through comments If you search for ``..slow..'' in the comments 
  420. field, the computer will find everybody whose comment mentions 
  421. ``slow''. It will find Clara Bell (who's ``Super-slow!'') and 
  422. also find Heinz Ketchopf (``the slowest Ketchopf in the West'').
  423.                                                      Unrestricted 
  424. search If you leave all the fields blank so that you're not 
  425. telling the computer to search for anything particular, the 
  426. computer will show you all the records in the file, without any 
  427. restrictions.
  428.                                                      Expand a 
  429. field If a field is too narrow to hold your search request, type 
  430. as much of the request as fits in the field, then say ``Edit 
  431. field'' (by pressing F6).
  432.                                                      The computer 
  433. will let you type the rest of the request at the bottom of the 
  434. screen; do so. When you finish typing the request, move on to the 
  435. next field (by pressing ENTER) or make the computer start 
  436. searching (by pressing F10).
  437.    Multi-field search
  438.   Suppose you want to find everybody who's old and stupid. 
  439. Specifically, suppose you want to find everybody whose age is 
  440. over 40 and who still hasn't finished the second grade. Put 
  441. ``>40'' in the age field, and put ``<3'' in the class field.
  442.   The computer will find Heinz Ketchopf (who's 57 years old and 
  443. in the first grade) and Russy-poo Walter (who's 44 years old and 
  444. whose class is 0). They're the students who are old and stupid.
  445.   Suppose you want to find the students who are old or stupid. To 
  446. do that, put ``>40'' in the age field, put ``<3'' in the class 
  447. field, then say ``Search options'' (by pressing Ctrl with F7). 
  448. Move the cursor down, then across to the word ANY. Press F10. The 
  449. computer will find Buffalo Bob Smith, Heinz Ketchopf, Tricky Dick 
  450. Nixon, and Russy-poo Walter, because each of them is either old 
  451. or stupid.
  452.  
  453.           Sort
  454.   When you've told the computer which records to search for, you 
  455. normally press F10, which makes the computer start searching.
  456.   Instead of just pressing F10, try doing the following: say 
  457. ``Calculate'' (by pressing F8), then type ``1a'' in the field 
  458. that interests you most, then finally press F10.
  459.   That makes the computer display the records in alphabetical or 
  460. numerical order. For example, if you put ``1a'' in the last name 
  461. field, the computer will display the records in alphabetical 
  462. order, by last name. If you put ``1a'' in the age field instead, 
  463. the computer will display the student records in order of age, 
  464. starting with the youngest student.
  465.   Putting the records into alphabetical or numerical order is 
  466. called sorting.
  467.   The usual kind of sorting is called ascending. When you type 
  468. ``1a'', the ``a'' stands for ``ascending''.
  469.   If you type ``1d'' instead, you get the opposite kind of 
  470. sorting, which is called descending. For example, if you put 
  471. ``1d'' in the last name field, the computer will display the 
  472. records in reverse alphabetical order, beginning with any Z names 
  473. and ending with A. If you put ``1d'' in the age field, the 
  474. computer will display the student records in order of decreasing 
  475. age, starting with the oldest student and ending with the 
  476. youngest.
  477.                              Suppose you put ``1a'' in the last 
  478. name field and ``2a'' in the age field. The ``1a'' makes the 
  479. computer sort by last name. If several students have the same 
  480. last name (such as the Smiths), the age field's ``2a'' makes the 
  481. computer ``break the tie'' by using the age: the computer will 
  482. show you the Smiths from youngest to oldest. In that situation, 
  483. the last name field is called the primary sort field; the age 
  484. field (which is used only for breaking a tie) is called the 
  485. secondary sort field. The ``1a'' means ``primary ascending''; the 
  486. ``2a'' means ``secondary ascending''.
  487.  
  488.                                                  Table
  489.                              Suppose you search for youngsters 
  490. (by saying ``Age: <18'' and then pressing F10). When the computer 
  491. shows you the first youngster's record, say ``Table'' (by 
  492. pressing Alt with F6). The computer will display this table, 
  493. which shows the records of all youngsters simultaneously:
  494. ┌───────────────┬───────────────┬───────────────┬───────────────┬
  495. ──────────────┐
  496. │   Last name   │  First name   │      Age      │     Class     │   
  497. Comments   │
  498. ├───────────────┼───────────────┼───────────────┼───────────────┼
  499. ──────────────┤
  500. │Smith          │Suzy           │              4│             
  501. 12│Though just 4■│
  502. │Smith          │Buffalo Bob    │              7│              
  503. 2│Boringly norm■│
  504. │Kosinski       │Stanislaw      │             16│             
  505. 11│He dislikes P■│
  506. └───────────────┴───────────────┴───────────────┴───────────────┴
  507. ──────────────┘
  508.                              In that table, each row is a record. 
  509. The top row is Suzy Smith's record. The bottom row is Stanislaw 
  510. Kosinski's record.
  511.                              Each column is a field. The left 
  512. column is the ``Last name'' field. The last column is the 
  513. ``Comments'' field.
  514.                              Since the screen is narrow, it shows 
  515. just 5 thin columns. Look at Stanislaw Kosinski's ``Comments'' 
  516. field. Since the column's too thin to show his entire Comments 
  517. field (``He dislikes Polish jokes''), the column shows just the 
  518. first few characters (``He dislikes P'') and a right-arrow (which 
  519. tells you that the field contains more characters). Version 3 
  520. doesn't bother to show the right-arrow.
  521.                              If you're using version 4, you can 
  522. edit the table while you stare at it. Just move the cursor down 
  523. to the row you want to edit (by pressing the down-arrow key), and 
  524. move the cursor across to the field you want to edit (by pressing 
  525. the TAB key). Here's what to do next:
  526. If you want to retype the field's info completely (and it's 
  527. short), go ahead: retype it!
  528. If you want to edit the field's info slightly (and it's short), 
  529. just press F5 and then edit.
  530. If the field's info is long (so you see ``■''), do this: press 
  531. F6, then edit, then press F10.
  532.                              If a file contains more than 5 
  533. fields, the table usually shows just the first 5 fields. If 
  534. you're using version 4, you can see the other fields by pressing 
  535. the TAB key several times.
  536.                              Here's another way to see 5 
  537. different fields (in both versions 3 and 4). Say ``Table 
  538. definition'' (by pressing Shift with F6). In the five fields you 
  539. want to see, type the numbers 1, 2, 3, 4, and 5. Make sure those 
  540. numbers aren't in any other fields. Then press F10.
  541.                              The screen's tall enough to show 17 
  542. rows of the table. To see other rows of a long table, press the 
  543. PgDn key.
  544.                              After viewing the table, move the 
  545. cursor to the row that interests you most, then press F10. The 
  546. screen will show all details of that row's record.
  547.  
  548.                 PRINT
  549.   Whenever the screen shows a student's record, you can print 
  550. that record on paper. Just say ``Print record'' (by pressing F2), 
  551. then press F10.
  552.   To have more fun instead, say ``Print remaining records'' (by 
  553. pressing Ctrl with F2), then press F10. The computer will print 
  554. the record, then print all subsequent records in the bunch you 
  555. were examining or adding.
  556.  
  557.            The print menu
  558.   To do fancier printing, get the file menu onto the screen, then 
  559. choose ``P - Print'' (by pressing P). Press ENTER.
  560.   The screen will show the print menu. From that menu, choose ``D 
  561. - Design/redesign a spec''.
  562.   Invent a name for the printout you'll create. The name can be 
  563. up to 31 characters long, and it can even contain blank spaces. 
  564. Type the name, then press F10.
  565.   The computer will show a blank form. Fill in the blanks to tell 
  566. the computer which records to print. For example, to print all 
  567. the Smiths, put ``Smith'' in the ``Last name'' field; then press 
  568. F10.
  569.   The computer will show another blank form. Choose one of these 
  570. three strategies. . . . 
  571. Strategy 1: leave the form blank. That tells the computer you 
  572. want standard printing. The computer will print all the record's 
  573. fields, in the same positions that they appear on the screen.
  574.  
  575. Strategy 2: give coordinates. For example, if you type ``2,10'' 
  576. in the last name field, the computer will print the student's 
  577. last name on paper, 2 lines down from the top margin, and 
  578. starting in the 10th space from the left margin. If you omit a 
  579. field's coordinates, that field will be unprinted.
  580.  
  581. Strategy 3: use + and x. For example, if you type a ``+'' in the 
  582. last name field, the computer will print the last name. If you 
  583. type an ``x'' in the last name field, the computer will print the 
  584. last name and then automatically do a carriage return, so the 
  585. next field it prints will appear underneath. Any field you leave 
  586. blank will be unprinted.
  587.   When you've chosen one of those three strategies (and filled in 
  588. the form appropriately), press F10.
  589.   The computer will say ``FILE PRINT OPTIONS''. If you want the 
  590. computer to print the field labels (so that the computer will 
  591. print ``Last name: Smith'' instead of printing just ``Smith''), 
  592. move the cursor down to ``Print field labels?'', then move left 
  593. to ``Yes''.
  594.   Press F10 again, then ENTER. The computer will print the 
  595. records you requested, then show you the print menu again.
  596.   If you want to repeat the printing, choose ``P - Print 
  597. records'' from that menu. (In version 3, choose ``P - Print 
  598. forms''.) Move the cursor to your printout's name. Press F10 then 
  599. ENTER. The computer will repeat the printing and show you the 
  600. print menu again.
  601.   When you don't want to do any more printing, press Esc. you'll 
  602. see the file menu again.
  603.                                                       Report
  604.                                          To print a fancy report, 
  605. get the Q&A main menu. (To do that, get the file menu, then press 
  606. Esc.) From the Q&A main menu, choose ``R - Report''. The screen 
  607. will show a report menu. From that menu, choose ``D - 
  608. Design/redesign a report'' (by pressing D). Press ENTER.
  609.                                          Invent a name for the 
  610. report you'll create. The name can be up to 31 characters long, 
  611. and it can even contain blank spaces. Type the name, then press 
  612. F10. (If you're using version 4, then choose ``C - Columnar 
  613. report'' by pressing C.)
  614.                                          The computer will show a 
  615. blank form. Fill in the blanks, to tell the computer who to 
  616. report on. For example, if you want to report on just the Smiths, 
  617. put ``Smith'' in the ``Last name'' field. To report on everybody 
  618. (which is what I suggest), leave the form blank.
  619.                                          Press F10. The computer 
  620. will show another blank form. This report will consist of several 
  621. columns. Put 1 in the field that you want to be the leftmost 
  622. column, 2 in the field that you want to be the next column, etc. 
  623. For example, if you want the person's last name to be the 
  624. leftmost column, the first name to be the next column, and the 
  625. age to be the third column, type this:
  626. Last name: 1                            First name: 2
  627. Age: 3              Class:
  628. Comments:
  629.                                          Better yet, put an 
  630. ``as'' in the last name field, and put an ``a'' in the age field, 
  631. like this:
  632. Last name: 1,as                         First name: 2
  633. Age: 3,a            Class:
  634. Comments:
  635. In the last name field, the ``as'' stands for ``ascending sort''; 
  636. it forces the computer to print the last names in alphabetical 
  637. order. In the age field, the ``a'' stands for ``average'': it 
  638. makes the computer print the average age.
  639.                                          When you finish filling 
  640. in that form, press F10 twice, then ENTER. The computer will 
  641. print this report:
  642. Last name     First name       Age
  643. ---------     -----------     -----
  644. Bell          Clara           21.00
  645.  
  646. Ketchopf      Heinz           57.00
  647.  
  648. Kosinski      Stanislaw       16.00
  649.  
  650. Nixon         Tricky Dick     78.00
  651.  
  652. Smith         Suzy             4.00
  653.               Buffalo Bob      7.00
  654.  
  655. Walter        Russy-poo       44.00
  656.  
  657. =========     ===========     =====
  658. Average:                      32.43
  659.                                          Notice that the computer 
  660. alphabetizes the left column, clumps the two Smiths together, and 
  661. prints the average age. The computer automatically makes each 
  662. column wide enough to fit even the longest names and numbers.
  663.                                          When the computer 
  664. finishes printing the report, it shows the report menu again.
  665.                                          If you want to print the 
  666. report again, choose ``P - Print a report'' from that menu (by 
  667. pressing P). Press ENTER. Move the cursor to your report's name. 
  668. Press F10 then ENTER. The computer will reprint the report and 
  669. show you the report menu again.
  670.                                          When you don't want to 
  671. print any more reports, press Esc. You'll see the main menu 
  672. again.
  673.   Fancy codes Instead of saying ``as'' (for ascending sort), you 
  674. can say ``ds'' (which gets you a descending sort).
  675.   Besides telling you the column's average (for which the code is 
  676. ``a''), Q&A can also tell you the column's total (``t''), count 
  677. (``c''), largest number (``max''), smallest number (``min''), and 
  678. all subtotals (``st''). To make Q&A do so, just put those codes 
  679. in the blanks.
  680.  
  681.              Mail merge
  682.   Suppose you want to write a personalized letter to each 
  683. student, so that Suzy Smith's letter will say ___ 
  684. Dear Suzy,
  685. Come to the party for grade 12 on Saturday.
  686. and Clara Bell's letter will say ___ 
  687. Dear Clara,
  688. Come to the party for grade 10 on Saturday.
  689.   Here's how. . . . 
  690.   First, get into the word processor. (To do that, get to the 
  691. file menu, then get to the main menu by pressing Esc, then choose 
  692. ``W - Write'' from the menu, then choose ``T - Type/edit'' from 
  693. the next menu.)
  694.   Type this form letter:
  695. Dear *First name*,
  696. Come to the party for grade *Class* on Saturday.
  697.   To type it, begin by typing the word ``Dear'', then tap the 
  698. space bar once.
  699.   To create the ``*First name*'', do the following. Say ``Field'' 
  700. (by pressing Alt with F7). The computer will ask you for the name 
  701. of the file; type ``students'' then ENTER. The computer will 
  702. display this list:
  703. FIELD NAMES
  704. Age
  705. Class
  706. Comments
  707. First name
  708. Last name
  709. Move the cursor to ``First name'', then ENTER. The computer will 
  710. automatically type ``*First name*'' in the middle of your memo.
  711.   Then type the rest of the form letter. Remember to type the 
  712. comma after *First name*, and remember that you can make the 
  713. computer automatically type *Class* for you, by pressing Alt with 
  714. F7.
  715.   When you finish typing the form letter, say ``Print'' (by 
  716. pressing F2). Then press F10.
  717.   You'll see a blank form. Use it to say which students will get 
  718. the letter. (For example, to send the letter to just the Smiths, 
  719. put ``Smith'' in the last name field. To send the letter to all 
  720. the students, leave the fields blank.) Press F10 then ENTER.
  721.   The computer will print the letters to all the students you 
  722. requested. That massive printing is called a mail merge, because 
  723. the computer does it by merging the form letter with the mailing 
  724. list of students.
  725.   When the computer finishes, you'll be using Q&A's word 
  726. processor again. To leave the word processor, press Esc twice; if 
  727. the computer asks ``Are you SURE?'', press Y. You'll see the Q&A 
  728. main menu.
  729.  
  730.  
  731.        MASS MOVES
  732.   Here's how to manipulate many records at once. . . . 
  733.  
  734.        Mass update
  735.   Suppose Mr. Smith ___ the father of Suzy Smith and Buffalo Bob 
  736. Smith ___ dies. His wife, Mrs. Smith, remarries and changes her 
  737. name to Mrs. Finkelstein. She also changes the names of her kids, 
  738. so that ``Suzy Smith'' becomes ``Suzy Finkelstein'', and 
  739. ``Buffalo Bob Smith'' becomes ``Buffalo Bob Finkelstein''.
  740.   We must tell the computer to turn the Smiths into Finkelsteins. 
  741. Since Suzy and Buffalo Bob are such wonderful kids, we'll also 
  742. move them into super-advanced classes that are ten times their 
  743. ages: we'll move Suzy (who is 6) into class 60, and move Buffalo 
  744. Bob (who is 7) into class 70. Here's how to do all that. . . . 
  745.   From the file menu, choose ``M - Mass update'' (by pressing M). 
  746. Press ENTER. You'll see a blank form.
  747.   Tell the computer who to search for. Since you want the 
  748. computer to search for all the Smiths, type ``Smith'' in the last 
  749. name field, then press F10.
  750.                              You'll see another blank form. Tell 
  751. the computer how to change the Smiths' records, by typing this:
  752. Last name: #1="Finkelstein"             First name:
  753. Age: #2             Class: #3=10*#2
  754. Comments:
  755. Notice you must put #1, #2, and #3 in the three fields involved 
  756. (Last name, Age, and Class). To make field #1 (which is Last 
  757. name) become Finkelstein, say #1=``Finkelstein''. To make field 
  758. #3 (which is Class) become 10 times field #2 (Age), say #3=10*#2.
  759.                              When you finish typing all that, 
  760. press F10 then N. The computer will change the Smiths to 
  761. Finkelsteins and make their classes become 10 times their ages. 
  762. Then you'll see the file menu again.
  763.                              How to make the whole school skip 
  764. Suppose all the school's students are doing so well that you want 
  765. to skip them ahead 5 years. (You'll move all the first graders to 
  766. the 6th grade, all the second graders to the 7th grade, all the 
  767. third graders to the 8th grade, etc.) Here's how. . . . 
  768.                              From the file menu, choose ``M - 
  769. Mass update''. Press ENTER. You'll see a blank form. Without 
  770. typing any restrictions, just press F10 (since you want to update 
  771. all students).
  772.                              You'll see another blank form. Since 
  773. you want to increase each student's class by 5, you should make 
  774. the class be called ``field #1'' and add 5 to it. To do that, say 
  775. ``Class: #1=5+#1'', which means ``the Class is field #1; and 
  776. field #1 will become equal to 5 more than what it had been.'' 
  777. Then press F10.
  778.                              The computer will increase each 
  779. student's class by 5. Then you'll see the file menu.
  780.  
  781.                                                 Remove
  782.                              Suppose all the Finkelsteins are 
  783. murdered. Let's remove them from the file.
  784.                              To remove the Finkelsteins, choose 
  785. ``R - Remove'' from the file menu by pressing R. Press ENTER. (If 
  786. you're using version 4, then choose ``S - Selected records'' by 
  787. pressing S.)
  788.                              You'll see a blank form. In the last 
  789. name field, type ``Finkelstein''.
  790.                              Press F10 then Y. The computer will 
  791. delete all the Finkelstein records. Then you'll see the file menu 
  792. again.
  793.  
  794.                                                 Backup
  795.                              Here's how to make the second copy 
  796. of STUDENTS.
  797.                              If you're using version 3, choose 
  798. ``B - Backup'' from the file menu by pressing B. If you're using 
  799. version 4, choose ``U -Utilities'' from the file menu by pressing 
  800. U, then choose ``B - Backup database'' by pressing B.
  801.                              Press ENTER.
  802.                              The computer will say ``Backup 
  803. to:''. To copy STUDENTS to the disk in drive A, put a blank 
  804. formatted disk into drive A, say ``Delete line'' (Shift F4), type 
  805. ``a:students'', then press ENTER. The computer will copy STUDENTS 
  806. from the hard disk to drive A.
  807.                              If you're using version 4, press Esc 
  808. to see the file menu again.
  809.  
  810.                                                  Copy
  811.                              Let's create a DOGS file about a 
  812. dog-obedience school. We want the DOGS file to contain the same 
  813. design that we used in the STUDENTS file, so a sample DOGS record 
  814. will look like this:
  815. Last name: McGregor                     First name: Lassie
  816. Age: 2              Class: 12
  817. Comments: She's a brilliant collie. Named after her grandma, a TV 
  818. star!
  819.                              Here's how to create the DOGS file, 
  820. so it uses the same design as the STUDENTS file but doesn't 
  821. contain the names of humans.
  822.                              From the file menu, choose ``C - 
  823. Copy'' (by pressing C). Press ENTER.
  824.                              You'll see a copy menu. Tap the D 
  825. key (for ``D - Copy design only''). Type the name of the new file 
  826. you're creating (``dogs''), then ENTER.
  827.                              The computer will create file called 
  828. DOGS, having the same design as STUDENTS but without any data in 
  829. it.
  830.                              You'll see the copy menu again. 
  831. Press Esc, to see the file menu again.
  832.  
  833.                     CUSTOMIZE
  834.   You can customize Q&A to meet your personal needs.
  835.   For example, let's create a database of all your friends and 
  836. customers around the world. Let's store each person's address and 
  837. phone number (to replace your phone book and Rolodex and create a 
  838. mailing list). Let's also store comments about each person and 
  839. date the comments, to make the file act as a diary.
  840.   Suppose some of those people occasionally send you money. Let's 
  841. record how much each person sends and make Q&A compute the 
  842. totals, so Q&A does your accounting.
  843.   Suppose you're in Massachusetts, and some of the money you 
  844. receive is for goods you sell. Let's make Q&A compute the 5% 
  845. sales tax, so Q&A does your taxes.
  846.   Here's how to make Q&A do all that. . . . 
  847.  
  848.                   Type the form
  849.   From Q&A's file menu, choose ``D - Design file'' (by pressing 
  850. D). When you see the design menu, tap the D key (to choose ``D - 
  851. Design a new file''), type ``friends'' (which will be the name 
  852. for the file), and press ENTER.
  853.   On the blank screen, type this form:
  854. ┌────────────────────────────────────────────────────────────────
  855. ──────────────┐
  856. │First name:                           Last name:                              
  857. │Department:                                          >                        
  858. │Company:                                             >                        
  859. │Address:                                             >                        
  860. │City:                       State:    Zip:           > Country:               
  861. └────────────────────────────────────────────────────────────────
  862. ──────────────┘
  863.  Phone numbers:                                       >
  864.                                                        ┌─────────
  865. ──────────────┐
  866.                                                        │Price:                 
  867.  Sales tax code (T=Taxable, R=Resale, N=Nonprofit):    │Sales 
  868. tax:             │
  869.                                                        │Total:                 
  870.                                                        └─────────
  871. ──────────────┘
  872.  Comments< 
  873.  
  874.  
  875.  
  876.  
  877.  
  878.                                                                                
  879. >
  880.                                         Group code:     Date:                  
  881. >
  882.   Boxes Notice that the form includes two boxes. The top box 
  883. contains the fields for the mailing label. The bottom box 
  884. contains the money fields.
  885.   Here's how to draw a box. Place the cursor where you want the 
  886. box's upper-left corner. Give the word-processing command for 
  887. ``Draw''. (To do that in version 3, press F8 then D. To do that 
  888. in version 4, press F8 then L then D.) Move the cursor towards 
  889. the right; as you move it, you'll be drawing the box's top line. 
  890. Draw the box's other three lines by moving the cursor down, then 
  891. left, then up until you've returned to the upper-left corner. 
  892. Then press F10.
  893.   The computer doesn't care whether you draw the box. The box's 
  894. purpose is just to beautify the life of your data-entry operator 
  895. (the person who'll be staring at the screen for many hours while 
  896. entering your data).
  897.   Six parts Like most good forms, that form consists of 6 parts 
  898. in this order:
  899. a box containing the mailing label's fields, in the order they'll 
  900. appear on the label
  901.  
  902. other fields that the operator must fill in (phone numbers, 
  903. price, and sales tax code)
  904.  
  905. fields that the operator will skip because they'll be filled in 
  906. by computer (sales tax and total)
  907.  
  908. a big space where the operator can jot comments (such as ``this 
  909. guy is a jerk'' or ``treat her nicer next time'' or ``oops ___ we 
  910. goofed'' or ``discuss this tough order with the boss'' or other 
  911. comments that are more specific)
  912.  
  913. a field for inserting a GROUP CODE, which is a code to generate 
  914. selective mailings; for example, you can browse through all the 
  915. records, put ``p'' in the ones that look interesting, and then 
  916. tell the computer to send mail to each person whose group code is 
  917. ``p''
  918.  
  919. a field to hold the date (we'll make the computer insert the date 
  920. automatically, but we'll also let the operator change the date to 
  921. handle special situations)
  922.  
  923.                                                      Shortened 
  924. fields Look at the ``Department'' field. It begins with the word 
  925. ``Department'', then comes a colon, then 42 blank spaces, then 
  926. the symbol ``>''.
  927.                                                      Later, when 
  928. the data-entry operator adds new records to the file by typing in 
  929. data, the computer will permit the operator to ``fill in the 42 
  930. blanks'' by filling in 42 characters. The computer will prevent 
  931. the operator from typing on or past the ``>''.
  932.                                                      That 
  933. prevents the operator from being too long-winded and typing too 
  934. much to fit on tiny mailing labels.
  935.                                                      Multi-line 
  936. fields Look at the ``Comments'' field. It begins with the word 
  937. ``Comments'', then comes the symbol ``<'' (instead of a colon), 
  938. then several blank lines. At the end of the last blank line, 
  939. you'll see the symbol ``>''.
  940.                                                      The symbols 
  941. ``<'' and ``>'' surround the area in which the operator can type 
  942. comments. If you omit the symbol ``>'', the computer will 
  943. restrict the operator to just one line of comments.
  944.                                                      When you 
  945. create a multi-line field, Q&A prohibits you from having other 
  946. symbols nearby. Specifically, you can't put a multi-line field in 
  947. a box, and you can't put two multi-line fields side-by-side.
  948.                                                      Final step 
  949. When you finish typing that form, press F10.
  950.              Change the format codes
  951.   You'll see the form you typed (except that the symbols ``<'' 
  952. and ``>'' are hidden). The computer automatically puts format 
  953. code T in each field, but you must change some of those T's to 
  954. other codes instead. To do so, move the cursor to each T (by 
  955. pressing TAB, ENTER, or arrow keys), then edit some of the T's, 
  956. to make your screen look like this:
  957. ┌────────────────────────────────────────────────────────────────
  958. ──────────────┐
  959. │First name: T                         Last name: T                            
  960. │Department: T                                        >                        
  961. │Company: T                                           >                        
  962. │Address: T                                           >                        
  963. │City: T                     State: TU Zip: TU        > Country: 
  964. TU            │
  965. └────────────────────────────────────────────────────────────────
  966. ──────────────┘
  967.  Phone numbers: T                                     >
  968.                                                        ┌─────────
  969. ──────────────┐
  970.                                                        │Price: MC 
  971. JR           │
  972.  Sales tax code (T=Taxable, R=Resale, N=Nonprofit): TU │Sales 
  973. tax: MC JR       │
  974.                                                        │Total: MC 
  975. JR           │
  976.                                                        └─────────
  977. ──────────────┘
  978.  Comments T
  979.  
  980.  
  981.  
  982.  
  983.  
  984.                                                                                
  985. >
  986.                                         Group code: TU  Date: D                
  987. >
  988.   Here's why.
  989.   Uppercase The state's format code should be TU instead of just 
  990. T. The U means ``Uppercase''. It makes the computer automatically 
  991. capitalize what the data-entry operator types.
  992.   The format code for Zip should be TU because some of the 
  993. customers are in Canada, where Zip codes have capital letters in 
  994. them.
  995.   Use T for phone numbers The format code for phone numbers is T 
  996. (not N), so that the phone number field can contain more than 
  997. just numbers. T lets you include phrases such as ``home number'', 
  998. ``work number'', ``extension'', and ``call after 4:30PM''. T also 
  999. lets you include parentheses and dashes, like this: (617) 
  1000. 666-2666.
  1001.   Money For money, the best format code is ``MC JR'', which means 
  1002. ``Money with Commas and Justified Right''. For example, suppose 
  1003. the operator types this price: ``42831.7''. When the operator 
  1004. finishes typing it and moves to the next field (by pressing TAB 
  1005. or ENTER), the ``MC'' code makes the computer automatically 
  1006. insert a dollar sign and comma and put 2 digits after the decimal 
  1007. point, so the screen shows ``$42,831.70'' instead of just 
  1008. ``42831.7''. Then the computer slides the $42,831.70 toward the 
  1009. right edge of the screen (because of the ``JR'' code), so that 
  1010. the decimal point is directly above the decimal points of numbers 
  1011. underneath.
  1012.   If you like all that but want the computer to omit the dollar 
  1013. sign, replace the ``M'' by ``N2'' (which means ``number with 2 
  1014. digits after the decimal point'').
  1015.   Time The format code for date is D. (A similar format code is 
  1016. H, which means ``hours and time of day''.)
  1017.   Finish When you've finished typing the format codes, press F10. 
  1018. If the computer says GLOBAL FORMAT OPTIONS, press F10 again. Then 
  1019. you'll see the file menu.
  1020.  
  1021.    The customize menu
  1022.   From the file menu, choose ``D - Design file'' again. From the 
  1023. next menu, choose ``C - Customize a file'' (by pressing C). Press 
  1024. ENTER.
  1025.   You'll see the customize menu:
  1026. CUSTOMIZE MENU
  1027. F - Format values
  1028. R - Restrict values
  1029. T - Field template
  1030. I - Set initial values
  1031. S - Speed up searches
  1032. D - Define custom help
  1033. C - Change palette
  1034. (Instead of ``T - Field template'', version 3 has ``P - Program 
  1035. form'', ``E - Edit lookup table'', and ``A - Assign access 
  1036. rights''.)
  1037.   Let's see how to use the most popular choices.
  1038.   Change palette To change the screen's colors, choose ``C - 
  1039. Change palette''. You'll see a blank form.
  1040.   Fill in a few fields, notice the screen's color scheme, and 
  1041. then press F8. The colors on the screen will change. (If you have 
  1042. a monochrome monitor, the underlines will disappear.)
  1043.   Each time you press F8, the colors, underlines, boldfacing, 
  1044. etc. will change again. When you finally see a color scheme you 
  1045. like, press F10, to return to the customize menu.
  1046.   The color schemes are called palettes. Many of the palettes are 
  1047. humorously wild.
  1048.   The bottom of the screen shows the palette's number. The most 
  1049. practical palettes are #2 and #3. They're the only palettes that 
  1050. show clearly which field you're editing.
  1051.   If your monitor is monochrome, choose palette #3. If your 
  1052. monitor is CGA color, choose palette #2. If your monitor is EGA 
  1053. or VGA color, choose either palette #3 (whose high contrast is 
  1054. the easiest to read) or palette #2 (whose soft blues will make 
  1055. you fall in love).
  1056.   Initial values To let your data-entry operator fill in the 
  1057. forms faster, choose ``I - Set initial values''.
  1058.   You'll see a blank form. If you fill in some of the fields now, 
  1059. the operator won't have to fill them in later.
  1060.   For example, if most of your customers are in San Francisco, 
  1061. California (because you grew up there and still advertise there), 
  1062. put ``San Francisco'' in the city field and ``CA'' in the state 
  1063. field. Put ``@date'' in the date field. Then press F10.
  1064.                              Later, when your data-entry operator 
  1065. adds new records, the computer will automatically fill in some of 
  1066. the fields by typing San Francisco, CA, and the correct date. The 
  1067. operator can edit what the computer typed, when the operator 
  1068. needs to deal with a customer that's not in San Francisco or not 
  1069. in California or whose record must be postdated.
  1070.                              Restrict values To protect yourself 
  1071. from data-entry errors, choose ``R - Restrict values''. You'll 
  1072. see a blank form.
  1073.                              Type in any restrictions you want to 
  1074. put on the data. For example, to restrict the price to under 
  1075. $50,000, type ``<50000'' in the price field. To restrict the 
  1076. sales tax code to T, R, or N, type ``T;R;N'' in the sales tax 
  1077. code field (after widening the field by pressing F6). When you 
  1078. finish typing the restrictions, press F10.
  1079.                              Later, if the data-entry operator 
  1080. tries to bypass a restriction (by typing a huge price or typing a 
  1081. wrong sales tax code), the computer will type this warning:
  1082. Value not in specified range.  Please verify before continuing.
  1083. Although the computer types that warning, the computer permits 
  1084. the operator to keep that unusual data in the file (so that the 
  1085. operator can handle unusual customers). The warning just alerts 
  1086. the operator that the value typed was nonstandard. That warning 
  1087. helps the operator notice typographical and clerical errors.
  1088.                              Speedy fields To make Q&A run 
  1089. faster, choose ``S - Speed up searches''. You'll see a blank 
  1090. form.
  1091.                              Type an S in each field that you 
  1092. often use for searching. For example, since you often look up a 
  1093. customer's record by using the customer's last name, type an S in 
  1094. the last name field. I recommend that you type an S in the last 
  1095. name field, company field, Zip field, and data field.
  1096.                              Putting an S in a field makes the 
  1097. computer create an index for that field. The index helps the 
  1098. computer search on that field more quickly. A field containing an 
  1099. S is called a speedy field or an index field.
  1100.                              Although the S makes the computer 
  1101. search faster, the S has two drawbacks: its index consumes a lot 
  1102. of space on the disk, and the computer must pause to update the 
  1103. index whenever you add a new record.
  1104.                              Because of those drawbacks, do not 
  1105. put an S in every field! Put an S in just the three or four 
  1106. fields that you search on most often.
  1107.                              When you finish typing the S's, 
  1108. press F10.
  1109.  
  1110.                                                 Program
  1111.                              To get total control over the 
  1112. computer, program it!
  1113.                              If you're using version 4, choose 
  1114. ``P - Program a file'' from the design menu, then press ENTER, 
  1115. then choose ``P - Program form''. If you're using version 3, 
  1116. choose ``P - Program form'' from the customize menu.
  1117.                              You'll see a blank form.
  1118.                              Let's make the computer 
  1119. automatically compute the Sales tax and Total. The computation 
  1120. involves four fields: the Price (which we'll call field #1), 
  1121. Sales tax code (#2), Sales tax (#3), and Total (#4).
  1122. Make the Price be field #1, by typing ``#1'' in the Price's 
  1123. blank.
  1124.  
  1125. Make the Sales tax code be field #2, by typing ``#2'' in the 
  1126. Sales tax code blank.
  1127.  
  1128. Make the Total be field #4 and also be the Price plus the Sales 
  1129. tax, by typing this in the Total blank: ``#4=#1+#3''.
  1130.  
  1131. In Massachusetts, which has a ``5% sales tax'', how much money 
  1132. should the Sales tax be? If a sale is taxable (because the Sales 
  1133. tax code is T), the Sales tax should be 5% of the Price. That 
  1134. means field #3 (which is the Sales tax) should equal .05 times 
  1135. field #1 (which is the Price). If the sale is not taxable, the 
  1136. Sales tax should be 0 instead. To explain all that to the 
  1137. computer, type this in the Sales tax blank (after pressing F6 to 
  1138. widen the field):
  1139. #3: if #2="T" then #3=.05*#1 else #3=0
  1140. When you type that line, make sure you type quotation marks 
  1141. around the ``T''. That line tells the computer that for this 
  1142. field (field #3), do the following computation: if field #2 (the 
  1143. Sales tax code) equals ``T'', then make field #3 equal .05 times 
  1144. field #1; otherwise, make field #3 equal 0.
  1145.                              After filling in the blanks that 
  1146. way, press F10. Later, when the data-entry operator enters a 
  1147. customer's record, the operator can fill in just the Price and 
  1148. Sales Tax code and then say ``Calculate'' (by pressing F8), which 
  1149. makes the computer obey your programming and automatically fill 
  1150. in the Sales tax and Total.